﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using Bitis_KeToanThue_Pro_DungChung.Common;

namespace Bitis_KeToanThue_Pro_Update.AccessDatabase
{
    public class DoiMatKhau
    {
        AccessData ac = new AccessData(1);
        public int doipass(string username, string pass, string passmoi)
        {
            SqlParameter[] arrPara = new SqlParameter[3];
            arrPara[0] = new SqlParameter("@username", SqlDbType.VarChar);
            arrPara[0].Value = username;

            arrPara[1] = new SqlParameter("@PWD", SqlDbType.NVarChar);
            arrPara[1].Value = pass;
            arrPara[2] = new SqlParameter("@PWDN", SqlDbType.NVarChar);
            arrPara[2].Value = passmoi;
            DataTable dt = ac.ftblDocDuLieuSP("doipass", arrPara);
            return int.Parse(dt.Rows[0]["ErrCode"].ToString());
        }
    }
}
